package com.webmall.servlet.product;
/**
 * 图书管理中新增图书
 * t
 */

import com.webmall.entity.CateEntity;
import com.webmall.service.webmall_CateDao;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.ArrayList;

@WebServlet("/manageHtml/admin_ToProdAdd")
public class ToProdAdd extends HttpServlet {


    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        //遍历不同级别分类后期添加更方便
        ArrayList<CateEntity> fatherList = webmall_CateDao.showCate("father");
        request.setAttribute("fatherList",fatherList);

        ArrayList<CateEntity> childList = webmall_CateDao.showCate("child");
        request.setAttribute("childList",childList);
       // System.out.println(cateList == null? 1:0);
        request.getRequestDispatcher("/manageHtml/admin_prodAdd.jsp").forward(request,response);

    }
}
